;******************************************************************************
;* TMS320C6x C/C++ Codegen                                    PC Version 4.36 *
;* Date/Time created: Tue Jun 22 14:07:15 2004                                *
;******************************************************************************

;******************************************************************************
;* GLOBAL FILE PARAMETERS                                                     *
;*                                                                            *
;*   Architecture      : TMS320C64xx                                          *
;*   Optimization      : Enabled at level 2                                   *
;*   Optimizing for    : Speed                                                *
;*                       Based on options: -o2, no -ms                        *
;*   Endian            : Little                                               *
;*   Interrupt Thrshld : 100                                                  *
;*   Memory Model      : Large                                                *
;*   Calls to RTS      : Far                                                  *
;*   Pipelining        : Enabled                                              *
;*   Speculative Load  : Enabled                                              *
;*   Memory Aliases    : Presume not aliases (optimistic)                     *
;*   Debug Info        : No Debug Info                                        *
;*                                                                            *
;******************************************************************************

	.asg	A15, FP
	.asg	B14, DP
	.asg	B15, SP
	.global	$bss

;	c:\ti_6000\c6000\cgtools\bin\opt6x.exe -t -DI100 -v6400 -q -O2 C:\DOCUME~1\A03238~1.USA\LOCALS~1\Temp\TI1644_2 C:\DOCUME~1\A03238~1.USA\LOCALS~1\Temp\TI1644_5 -w . 

	.sect	".text"
	.global	_dstr_open

;******************************************************************************
;* FUNCTION NAME: _dstr_open                                                  *
;*                                                                            *
;*   Regs Modified     : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A11,A13,B0,B1,B2,B3,B4,*
;*                           B5,B6,B7,B8,B9,B13,SP,A16,A17,A18,A19,A20,A21,   *
;*                           A22,A23,A24,A25,A26,A27,A28,A29,A30,A31,B16,B17, *
;*                           B18,B19,B20,B21,B22,B23,B24,B25,B26,B27,B28,B29, *
;*                           B30,B31                                          *
;*   Regs Used         : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,B0,B1, *
;*                           B2,B3,B4,B5,B6,B7,B8,B9,B10,B12,B13,SP,A16,A17,  *
;*                           A18,A19,A20,A21,A22,A23,A24,A25,A26,A27,A28,A29, *
;*                           A30,A31,B16,B17,B18,B19,B20,B21,B22,B23,B24,B25, *
;*                           B26,B27,B28,B29,B30,B31                          *
;*   Local Frame Size  : 0 Args + 0 Auto + 12 Save = 12 byte                  *
;******************************************************************************
_dstr_open:
;** --------------------------------------------------------------------------*
           STW     .D2T1   A13,*SP--(16)     ; |41| 

           STW     .D2T2   B13,*+SP(12)      ; |41| 
||         ZERO    .D1     A3                ; |49| 
||         MV      .S1     A4,A2             ; |41| 

           ZERO    .D1     A4                ; |49| 
||         MV      .S1     A4,A11            ; |41| 
||         STW     .D2T1   A11,*+SP(8)       ; |41| 
||         MV      .L1X    B4,A1             ; |41| 

   [!A2]   MVK     .D1     0x1,A4            ; |49| 
|| [!A1]   MVK     .S1     0x1,A3            ; |49| 

           OR      .D1     A3,A4,A3          ; |49| 
||         ZERO    .D2     B4                ; |49| 
||         MV      .S1X    B6,A0             ; |41| 
||         MV      .S2     B4,B5             ; |41| 

   [!A0]   MVK     .D2     0x1,B4            ; |49| 

           CMPEQ   .L1     A8,0,A4           ; |49| 
||         OR      .D2X    B4,A3,B4          ; |49| 
||         CMPEQ   .L2     B8,0,B6           ; |49| 

           CMPEQ   .L2X    A10,0,B6          ; |49| 
||         OR      .D2     B6,B4,B4          ; |49| 

           OR      .D2X    A4,B4,B7          ; |49| 
           OR      .D2     B6,B7,B0          ; |49| 
   [ B0]   B       .S1     L2                ; |50| 

           CMPEQ   .L2     B12,1,B4          ; |51| 
||         CMPEQ   .L1     A12,1,A3          ; |51| 

           MV      .D1X    B8,A3             ; |41| 
||         XOR     .S1     1,A3,A4           ; |51| 

           AND     .D1X    A4,B4,A1          ; |51| 
||         MV      .D2     B10,B8            ; |41| 
||         MV      .S2     B3,B13            ; |41| 
||         MVK     .S1     0xffffffff,A13    ; |50| 
||         MV      .L1     A6,A9             ; |41| 
|| [!B0]   MPYU    .M1     A12,A3,A4         ; |52| 

   [ B0]   LDW     .D2T1   *+SP(8),A11       ; |111| 
|| [ B0]   MV      .S2     B13,B3            ; |111| 

   [!B0]   MPYLHU  .M1     A10,A4,A5         ; |52| 
           ; BRANCH OCCURS                   ; |50| 
;** --------------------------------------------------------------------------*
           MPYU    .M1     A10,A4,A4         ; |52| 

   [ A1]   B       .S2     L2                ; |51| 
||         SHL     .S1     A5,16,A5          ; |52| 

           ADD     .D1     A4,A5,A4          ; |52| 
           ADD     .D1     A4,A4,A5          ; |52| 
           CMPGT   .L1     A5,A8,A5          ; |52| 
           CMPEQ   .L1     A12,0,A4          ; |52| 

           OR      .D1     A4,A5,A2          ; |52| 
||         MVK     .S1     0xfffffffe,A13    ; |51| 
|| [ A1]   LDW     .D2T1   *+SP(8),A11       ; |111| 
|| [ A1]   MV      .S2     B13,B3            ; |111| 

           ; BRANCH OCCURS                   ; |51| 
;** --------------------------------------------------------------------------*
   [ A2]   B       .S1     L2                ; |56| 
           MPYU    .M1     A3,A10,A5         ; |68| 
           MPYU    .M1     A12,A10,A7        ; |74| 

           MPYUS   .M1     A12,A5,A3         ; |68| 
||         MV      .D2X    A3,B6             ; |71| 

           MV      .D1     A9,A4             ; |65| 
||         MVK     .S1     0xfffffffd,A13    ; |56| 
||         MVKL    .S2     __remi,B7         ; |65| 

           ZERO    .D1     A3                ; |70| 
||         ADD     .S1     A3,A3,A18         ; |68| 
||         MPYUS   .M1X    B6,A7,A16         ; |74| 
||         MVKH    .S2     __remi,B7         ; |65| 
||         ZERO    .L1     A17               ; |70| 
||         MPYU    .M2X    A10,B8,B4         ; |65| 
|| [ A2]   LDW     .D2T1   *+SP(8),A11       ; |111| 
|| [ A2]   MV      .L2     B13,B3            ; |111| 

           ; BRANCH OCCURS                   ; |56| 
;** --------------------------------------------------------------------------*
           CALL    .S2     B7                ; |65| 
           ADDKPC  .S2     RL0,B3,3          ; |65| 
           STW     .D1T2   B5,*A11           ; |64| 
RL0:       ; CALL OCCURS                     ; |65| 
           STW     .D1T1   A0,*+A11(12)      ; |67| 
           STW     .D1T1   A3,*+A11(4)       ; |76| 
           STH     .D1T1   A17,*+A11(16)     ; |70| 

           STH     .D1T2   B6,*+A11(22)      ; |71| 
||         MV      .S1X    B12,A0            ; |65| 
||         MV      .L1     A0,A6             ; |90| 

   [ A0]   B       .S1     L1                ; |107| 
||         STH     .D1T1   A18,*+A11(18)     ; |68| 

           STH     .D1T1   A16,*+A11(20)     ; |74| 

           STH     .D1T2   B8,*+A11(26)      ; |75| 
||         EXTU    .S1     A7,16,16,A8       ; |90| 

           MVKL    .S1     0x5200001,A4      ; |90| 
||         SUB     .L1     A9,A4,A3          ; |65| 
||         STH     .D1T1   A10,*+A11(24)     ; |72| 

           MVK     .S1     -1,A3             ; |107| 
|| [ A0]   MV      .L1     A11,A5            ; |65| 
||         STW     .D1T1   A3,*+A11(8)       ; |65| 
||         MVKL    .S2     _DAT_copy2d,B5    ; |90| 
||         MV      .D2     B5,B4             ; |67| 

   [ A0]   STW     .D1T1   A3,*+A5(4)        ; |107| 
||         MVKH    .S1     0x5200001,A4      ; |90| 
||         MVKH    .S2     _DAT_copy2d,B5    ; |90| 
||         ZERO    .L1     A13               ; |107| 

           ; BRANCH OCCURS                   ; |107| 
;** --------------------------------------------------------------------------*
           CALL    .S2     B5                ; |90| 
           ADDKPC  .S2     RL1,B3,4          ; |90| 
RL1:       ; CALL OCCURS                     ; |90| 
           LDHU    .D1T1   *+A11(26),A3      ; |97| 
           LDHU    .D1T2   *+A11(22),B4      ; |98| 
           NOP             2
           LDHU    .D1T1   *+A11(16),A5      ; |98| 
           STW     .D1T1   A4,*+A11(28)      ; |99| 

           MPYU    .M1     A3,A10,A3         ; |97| 
||         MPYU    .M2X    B4,A10,B4         ; |98| 

           LDW     .D1T1   *+A11(4),A6       ; |97| 

           MPYLHU  .M1     A12,A3,A7         ; |97| 
||         MPYUS   .M2X    A12,B4,B4         ; |98| 

           MPYU    .M1     A12,A3,A3         ; |97| 
           SHL     .S1     A7,16,A7          ; |97| 

           ADD     .S1X    B4,A5,A3          ; |98| 
||         ADD     .L1     A3,A7,A4          ; |97| 

           ADD     .S1     A4,A6,A3          ; |97| 
||         STH     .D1T1   A3,*+A11(16)      ; |98| 

           STW     .D1T1   A3,*+A11(4)       ; |97| 
;** --------------------------------------------------------------------------*
L1:    

           LDW     .D2T1   *+SP(8),A11       ; |111| 
||         MV      .S2     B13,B3            ; |111| 

;** --------------------------------------------------------------------------*
L2:    

           RET     .S2     B3                ; |111| 
||         LDW     .D2T2   *+SP(12),B13      ; |111| 

           LDW     .D2T1   *++SP(16),A13     ; |111| 
||         MV      .D1     A13,A4            ; |100| 

           NOP             4
           ; BRANCH OCCURS                   ; |111| 



	.sect	".text"
	.global	_dstr_get

;******************************************************************************
;* FUNCTION NAME: _dstr_get                                                   *
;*                                                                            *
;*   Regs Modified     : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,B0,*
;*                           B1,B2,B3,B4,B5,B6,B7,B8,B9,B13,SP,A16,A17,A18,   *
;*                           A19,A20,A21,A22,A23,A24,A25,A26,A27,A28,A29,A30, *
;*                           A31,B16,B17,B18,B19,B20,B21,B22,B23,B24,B25,B26, *
;*                           B27,B28,B29,B30,B31                              *
;*   Regs Used         : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,B0,*
;*                           B1,B2,B3,B4,B5,B6,B7,B8,B9,B13,SP,A16,A17,A18,   *
;*                           A19,A20,A21,A22,A23,A24,A25,A26,A27,A28,A29,A30, *
;*                           A31,B16,B17,B18,B19,B20,B21,B22,B23,B24,B25,B26, *
;*                           B27,B28,B29,B30,B31                              *
;*   Local Frame Size  : 0 Args + 0 Auto + 24 Save = 24 byte                  *
;******************************************************************************
_dstr_get:
;** --------------------------------------------------------------------------*
           STW     .D2T1   A14,*SP--(24)     ; |117| 
           STDW    .D2T1   A13:A12,*+SP(16)  ; |117| 

           MV      .D1     A4,A11            ; |117| 
||         STDW    .D2T1   A11:A10,*+SP(8)   ; |117| 

           LDHU    .D1T1   *+A11(22),A6      ; |135| 
           LDHU    .D1T1   *+A11(16),A9      ; |138| 
           LDHU    .D1T1   *+A11(16),A3      ; |134| 
           LDW     .D1T1   *+A11(4),A5       ; |156| 
           LDW     .D1T1   *+A11(8),A8       ; |156| 
           LDW     .D1T1   *+A11(12),A7      ; |134| 
           LDHU    .D1T1   *+A11(18),A16     ; |147| 

           LDHU    .D1T1   *+A11(20),A4      ; |135| 
||         ADD     .S1     A6,A9,A9          ; |138| 

           STH     .D1T1   A9,*+A11(16)      ; |138| 

           LDHU    .D1T1   *+A11(16),A9      ; |147| 
||         CMPLTU  .L1     A5,A8,A1          ; |156| 

   [!A1]   BNOP    .S1     L3,1              ; |156| 

           ADD     .D1     A6,A4,A8          ; |135| 
||         CMPLT   .L1     A3,A4,A0          ; |137| 

           SUB     .D1     A3,A4,A3          ; |137| 
||         CMPLT   .L1     A3,A8,A8          ; |135| 
||         ADD     .S1     A3,A7,A12         ; |134| 
||         MVKL    .S2     _DAT_copy,B5      ; |159| 

           SUB     .D1     A4,A6,A9          ; |148| 
||         ADD     .S1     A7,A3,A10         ; |137| 
||         CMPLT   .L1     A9,A16,A2         ; |147| 
||         MVKH    .S2     _DAT_copy,B5      ; |159| 

   [!A2]   STH     .D1T1   A9,*+A11(16)      ; |148| 
|| [ A0]   ADD     .S1     A4,A7,A10         ; |137| 
||         XOR     .L1     1,A8,A13          ; |135| 
||         MV      .S2X    A12,B4            ; |159| 
||         MV      .L2     B3,B13            ; |117| 
||         STW     .D2T2   B13,*+SP(4)       ; |117| 

           ; BRANCH OCCURS                   ; |156| 
;** --------------------------------------------------------------------------*

           CALL    .S2     B5                ; |159| 
||         LDW     .D1T1   *A11,A3           ; |159| 

           ADDKPC  .S2     RL2,B3,3          ; |159| 
           ADD     .D1     A5,A3,A4          ; |159| 
RL2:       ; CALL OCCURS                     ; |159| 
           MV      .D1     A4,A14            ; |159| 
;** --------------------------------------------------------------------------*
L3:    
           MV      .D1     A13,A0            ; |172| 
   [!A0]   BNOP    .S1     L4,1              ; |169| 
           MVKL    .S2     _DAT_copy,B5      ; |172| 

           MVKH    .S2     _DAT_copy,B5      ; |172| 
||         MV      .D1     A12,A4            ; |172| 

   [!A0]   MVKL    .S2     _DAT_wait,B4      ; |180| 
   [!A0]   MVKH    .S2     _DAT_wait,B4      ; |180| 
           ; BRANCH OCCURS                   ; |169| 
;** --------------------------------------------------------------------------*

           CALL    .S2     B5                ; |172| 
||         LDHU    .D1T1   *+A11(22),A6      ; |172| 

           MV      .D2X    A10,B4            ; |172| 
           ADDKPC  .S2     RL3,B3,2          ; |172| 
           SUB     .L2X    B4,A6,B4          ; |172| 
RL3:       ; CALL OCCURS                     ; |172| 
           MV      .D1     A4,A14            ; |172| 
           MVKL    .S2     _DAT_wait,B4      ; |180| 
           MVKH    .S2     _DAT_wait,B4      ; |180| 
;** --------------------------------------------------------------------------*
L4:    
           CALL    .S2     B4                ; |180| 
           LDW     .D1T1   *+A11(28),A4      ; |180| 
           ADDKPC  .S2     RL4,B3,3          ; |180| 
RL4:       ; CALL OCCURS                     ; |180| 
           LDHU    .D1T1   *+A11(26),A5      ; |186| 
           LDW     .D1T1   *+A11(4),A3       ; |186| 
           STW     .D1T1   A14,*+A11(28)     ; |185| 
           LDDW    .D2T1   *+SP(16),A13:A12  ; |192| 
           MV      .S2     B13,B3            ; |192| 
           LDW     .D2T2   *+SP(4),B13       ; |192| 
           ADD     .D1     A5,A3,A3          ; |186| 
           STW     .D1T1   A3,*+A11(4)       ; |186| 

           RET     .S2     B3                ; |192| 
||         LDDW    .D2T1   *+SP(8),A11:A10   ; |192| 
||         MV      .D1     A10,A4

           LDW     .D2T1   *++SP(24),A14     ; |192| 
           NOP             4
           ; BRANCH OCCURS                   ; |192| 



	.sect	".text"
	.global	_dstr_put

;******************************************************************************
;* FUNCTION NAME: _dstr_put                                                   *
;*                                                                            *
;*   Regs Modified     : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,B0,B1,B2,B3,B4,B5, *
;*                           B6,B7,B8,B9,B10,B11,B12,B13,SP,A16,A17,A18,A19,  *
;*                           A20,A21,A22,A23,A24,A25,A26,A27,A28,A29,A30,A31, *
;*                           B16,B17,B18,B19,B20,B21,B22,B23,B24,B25,B26,B27, *
;*                           B28,B29,B30,B31                                  *
;*   Regs Used         : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,B0,B1,B2,B3,B4,B5, *
;*                           B6,B7,B8,B9,B10,B11,B12,B13,SP,A16,A17,A18,A19,  *
;*                           A20,A21,A22,A23,A24,A25,A26,A27,A28,A29,A30,A31, *
;*                           B16,B17,B18,B19,B20,B21,B22,B23,B24,B25,B26,B27, *
;*                           B28,B29,B30,B31                                  *
;*   Local Frame Size  : 0 Args + 0 Auto + 20 Save = 20 byte                  *
;******************************************************************************
_dstr_put:
;** --------------------------------------------------------------------------*
           STW     .D2T1   A10,*SP--(24)     ; |198| 
           STDW    .D2T2   B13:B12,*+SP(16)  ; |198| 

           MV      .S2X    A4,B10            ; |198| 
||         STDW    .D2T2   B11:B10,*+SP(8)   ; |198| 

           LDW     .D2T2   *+B10(4),B4       ; |206| 
           NOP             1
           MV      .D2     B3,B13            ; |198| 
           ZERO    .L2     B5                ; |208| 
           MVK     .D1     0x1,A6            ; |211| 
           CMPLT   .L2     B4,0,B0           ; |206| 
   [!B0]   B       .S1     L5                ; |206| 
           MVKL    .S2     _DAT_copy,B6      ; |211| 
           MVKH    .S2     _DAT_copy,B6      ; |211| 
   [ B0]   STW     .D2T2   B5,*+B10(4)       ; |208| 
   [ B0]   LDW     .D2T2   *B10,B4           ; |211| 
   [!B0]   LDW     .D2T2   *+B10(8),B6       ; |222| 
           ; BRANCH OCCURS                   ; |206| 
;** --------------------------------------------------------------------------*

           CALL    .S2     B6                ; |211| 
||         LDW     .D2T2   *+B10(4),B7       ; |211| 

           LDW     .D2T1   *+B10(12),A4      ; |211| 
           ADDKPC  .S2     RL5,B3,0          ; |211| 
           STH     .D2T2   B5,*+B10(16)      ; |209| 
           NOP             1
           ADD     .L2     B7,B4,B4          ; |211| 
RL5:       ; CALL OCCURS                     ; |211| 
           BNOP    .S1     L7,1              ; |216| 
           MV      .D1     A4,A3             ; |211| 
           STW     .D2T1   A3,*+B10(28)      ; |215| 
           LDW     .D2T1   *+B10(12),A4      ; |216| 

           MV      .S2     B13,B3            ; |252| 
||         LDDW    .D2T2   *+SP(8),B11:B10   ; |252| 

           ; BRANCH OCCURS                   ; |216| 
;** --------------------------------------------------------------------------*
L5:    
           NOP             4
           CMPLTU  .L2     B4,B6,B0          ; |222| 
   [!B0]   B       .S1     L6                ; |222| 
           MVKL    .S2     _DAT_copy,B5      ; |225| 

   [ B0]   LDHU    .D2T1   *+B10(16),A3      ; |225| 
||         MVKH    .S2     _DAT_copy,B5      ; |225| 

   [ B0]   LDW     .D2T2   *+B10(12),B7      ; |225| 
   [!B0]   LDHU    .D2T2   *+B10(22),B4      ; |235| 
   [!B0]   LDHU    .D2T2   *+B10(16),B5      ; |235| 
           ; BRANCH OCCURS                   ; |222| 
;** --------------------------------------------------------------------------*

           CALL    .S2     B5                ; |225| 
||         LDW     .D2T2   *B10,B6           ; |225| 

           LDHU    .D2T1   *+B10(22),A6      ; |225| 
           ADDKPC  .S2     RL6,B3,1          ; |225| 
           ADD     .D1X    A3,B7,A4          ; |225| 
           ADD     .D2     B4,B6,B4          ; |225| 
RL6:       ; CALL OCCURS                     ; |225| 
           MV      .D2X    A4,B11            ; |225| 
           LDHU    .D2T2   *+B10(22),B4      ; |235| 
           LDHU    .D2T2   *+B10(16),B5      ; |235| 
;** --------------------------------------------------------------------------*
L6:    
           LDW     .D2T2   *+B10(4),B6       ; |234| 
           LDHU    .D2T2   *+B10(26),B7      ; |234| 
           MVKL    .S1     _DAT_wait,A3      ; |241| 

           LDW     .D2T2   *+B10(12),B12     ; |236| 
||         MVKH    .S1     _DAT_wait,A3      ; |241| 

           XOR     .S2     B4,B5,B4          ; |235| 
||         LDW     .D2T1   *+B10(28),A4      ; |241| 

           CALL    .S2X    A3                ; |241| 
||         STH     .D2T2   B4,*+B10(16)      ; |235| 

           LDHU    .D2T1   *+B10(16),A10     ; |236| 
           ADDKPC  .S2     RL7,B3,1          ; |241| 
           ADD     .D2     B7,B6,B4          ; |234| 
           STW     .D2T2   B4,*+B10(4)       ; |234| 
RL7:       ; CALL OCCURS                     ; |241| 

           ADD     .D1X    A10,B12,A4        ; |236| 
||         STW     .D2T2   B11,*+B10(28)     ; |246| 

           LDDW    .D2T2   *+SP(8),B11:B10   ; |252| 
||         MV      .S2     B13,B3            ; |252| 

;** --------------------------------------------------------------------------*
L7:    

           RET     .S2     B3                ; |252| 
||         LDDW    .D2T2   *+SP(16),B13:B12  ; |252| 

           LDW     .D2T1   *++SP(24),A10     ; |252| 
           NOP             4
           ; BRANCH OCCURS                   ; |252| 



	.sect	".text"
	.global	_dstr_get_2D

;******************************************************************************
;* FUNCTION NAME: _dstr_get_2D                                                *
;*                                                                            *
;*   Regs Modified     : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,B0,*
;*                           B1,B2,B3,B4,B5,B6,B7,B8,B9,B13,SP,A16,A17,A18,   *
;*                           A19,A20,A21,A22,A23,A24,A25,A26,A27,A28,A29,A30, *
;*                           A31,B16,B17,B18,B19,B20,B21,B22,B23,B24,B25,B26, *
;*                           B27,B28,B29,B30,B31                              *
;*   Regs Used         : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,B0,*
;*                           B1,B2,B3,B4,B5,B6,B7,B8,B9,B13,SP,A16,A17,A18,   *
;*                           A19,A20,A21,A22,A23,A24,A25,A26,A27,A28,A29,A30, *
;*                           A31,B16,B17,B18,B19,B20,B21,B22,B23,B24,B25,B26, *
;*                           B27,B28,B29,B30,B31                              *
;*   Local Frame Size  : 0 Args + 0 Auto + 24 Save = 24 byte                  *
;******************************************************************************
_dstr_get_2D:
;** --------------------------------------------------------------------------*
           STW     .D2T1   A14,*SP--(24)     ; |259| 
           STDW    .D2T1   A13:A12,*+SP(16)  ; |259| 

           MV      .D1     A4,A11            ; |259| 
||         STDW    .D2T1   A11:A10,*+SP(8)   ; |259| 

           LDHU    .D1T1   *+A11(22),A7      ; |277| 
           LDHU    .D1T1   *+A11(24),A8      ; |277| 
           LDHU    .D1T1   *+A11(16),A6      ; |276| 
           LDHU    .D1T1   *+A11(16),A4      ; |280| 
           LDW     .D1T1   *+A11(8),A18      ; |298| 
           LDW     .D1T2   *+A11(4),B4       ; |298| 

           LDHU    .D1T1   *+A11(20),A3      ; |277| 
||         MPYU    .M1     A7,A8,A5          ; |277| 

           LDW     .D1T1   *+A11(12),A9      ; |276| 

           LDHU    .D1T1   *+A11(18),A19     ; |289| 
||         ADD     .S1     A5,A4,A4          ; |280| 

           STH     .D1T1   A4,*+A11(16)      ; |280| 
           LDHU    .D1T1   *+A11(16),A20     ; |289| 
           CMPLTU  .L2X    B4,A18,B0         ; |298| 
   [!B0]   B       .S1     L8                ; |298| 

           CMPLT   .L1     A6,A3,A0          ; |279| 
||         SUB     .D1     A6,A3,A16         ; |279| 

           ADD     .D1     A6,A9,A13         ; |276| 
||         ADD     .S1     A9,A16,A10        ; |279| 
||         ADD     .L1     A3,A5,A17         ; |277| 

   [ A0]   ADD     .D1     A3,A9,A10         ; |279| 
||         MVKL    .S1     0x5200001,A4      ; |300| 
||         CMPLT   .L1     A20,A19,A1        ; |289| 
||         MVKL    .S2     _DAT_copy2d,B5    ; |300| 

           MVKH    .S1     0x5200001,A4      ; |300| 
||         SUB     .D1     A3,A5,A5          ; |290| 
||         CMPLT   .L1     A6,A17,A16        ; |277| 
||         MVKH    .S2     _DAT_copy2d,B5    ; |300| 

   [!A1]   STH     .D1T1   A5,*+A11(16)      ; |290| 
||         ADD     .S1     A6,A9,A6          ; |276| 
||         XOR     .L1     1,A16,A12         ; |277| 
||         MV      .S2     B3,B13            ; |259| 
||         STW     .D2T2   B13,*+SP(4)       ; |259| 
||         MV      .L2X    A7,B6             ; |300| 

           ; BRANCH OCCURS                   ; |298| 
;** --------------------------------------------------------------------------*

           CALL    .S2     B5                ; |300| 
||         LDW     .D1T1   *A11,A3           ; |300| 

           LDHU    .D1T2   *+A11(26),B8      ; |300| 
           ADDKPC  .S2     RL8,B3,2          ; |300| 
           ADD     .D2X    B4,A3,B4          ; |300| 
RL8:       ; CALL OCCURS                     ; |300| 
           MV      .D1     A4,A14            ; |300| 
;** --------------------------------------------------------------------------*
L8:    
           MV      .D1     A12,A0            ; |315| 
   [!A0]   B       .S1     L9                ; |313| 
           MVKL    .S2     _DAT_copy,B5      ; |315| 

           MVKH    .S2     _DAT_copy,B5      ; |315| 
||         MV      .S1     A13,A4            ; |315| 
|| [ A0]   LDHU    .D1T1   *+A11(22),A5      ; |315| 

   [ A0]   LDHU    .D1T1   *+A11(24),A3      ; |315| 
|| [!A0]   MVKL    .S2     _DAT_wait,B4      ; |323| 

           NOP             1
   [!A0]   MVKH    .S2     _DAT_wait,B4      ; |323| 
           ; BRANCH OCCURS                   ; |313| 
;** --------------------------------------------------------------------------*
           CALL    .S2     B5                ; |315| 
           MV      .D2X    A10,B4
           MPYU    .M1     A3,A5,A6          ; |315| 
           MPYU    .M1     A5,A3,A3          ; |315| 
           ADDKPC  .S2     RL9,B3,0          ; |315| 

           SUB     .L2X    B4,A6,B4          ; |315| 
||         EXTU    .S1     A3,16,16,A6       ; |315| 

RL9:       ; CALL OCCURS                     ; |315| 
           MV      .D1     A4,A14            ; |315| 
           MVKL    .S2     _DAT_wait,B4      ; |323| 
           MVKH    .S2     _DAT_wait,B4      ; |323| 
;** --------------------------------------------------------------------------*
L9:    
           CALL    .S2     B4                ; |323| 
           LDW     .D1T1   *+A11(28),A4      ; |323| 
           ADDKPC  .S2     RL10,B3,3         ; |323| 
RL10:      ; CALL OCCURS                     ; |323| 
           LDHU    .D1T1   *+A11(24),A3      ; |329| 
           LDHU    .D1T1   *+A11(26),A4      ; |329| 
           LDW     .D1T1   *+A11(4),A5       ; |329| 
           LDDW    .D2T1   *+SP(16),A13:A12  ; |335| 
           MV      .S2     B13,B3            ; |335| 
           LDW     .D2T2   *+SP(4),B13       ; |335| 
           MPYU    .M1     A4,A3,A3          ; |329| 
           STW     .D1T1   A14,*+A11(28)     ; |328| 
           ADD     .D1     A3,A5,A3          ; |329| 
           STW     .D1T1   A3,*+A11(4)       ; |329| 

           RET     .S2     B3                ; |335| 
||         LDDW    .D2T1   *+SP(8),A11:A10   ; |335| 
||         MV      .D1     A10,A4            ; |329| 

           LDW     .D2T1   *++SP(24),A14     ; |335| 
           NOP             4
           ; BRANCH OCCURS                   ; |335| 



	.sect	".text"
	.global	_dstr_put_2D

;******************************************************************************
;* FUNCTION NAME: _dstr_put_2D                                                *
;*                                                                            *
;*   Regs Modified     : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,B0,B1,B2,B3,B4,B5, *
;*                           B6,B7,B8,B9,B10,B11,B12,B13,SP,A16,A17,A18,A19,  *
;*                           A20,A21,A22,A23,A24,A25,A26,A27,A28,A29,A30,A31, *
;*                           B16,B17,B18,B19,B20,B21,B22,B23,B24,B25,B26,B27, *
;*                           B28,B29,B30,B31                                  *
;*   Regs Used         : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,B0,B1,B2,B3,B4,B5, *
;*                           B6,B7,B8,B9,B10,B11,B12,B13,SP,A16,A17,A18,A19,  *
;*                           A20,A21,A22,A23,A24,A25,A26,A27,A28,A29,A30,A31, *
;*                           B16,B17,B18,B19,B20,B21,B22,B23,B24,B25,B26,B27, *
;*                           B28,B29,B30,B31                                  *
;*   Local Frame Size  : 0 Args + 0 Auto + 20 Save = 20 byte                  *
;******************************************************************************
_dstr_put_2D:
;** --------------------------------------------------------------------------*
           STW     .D2T1   A10,*SP--(24)     ; |341| 
           STDW    .D2T2   B13:B12,*+SP(16)  ; |341| 

           MV      .S2X    A4,B10            ; |341| 
||         STDW    .D2T2   B11:B10,*+SP(8)   ; |341| 

           LDW     .D2T1   *+B10(4),A3       ; |349| 
           NOP             1
           MV      .D2     B3,B13            ; |341| 
           ZERO    .L2     B4                ; |351| 
           MVK     .D1     0x1,A6            ; |353| 
           CMPLT   .L1     A3,0,A0           ; |349| 
   [!A0]   B       .S1     L10               ; |349| 
           MVKL    .S2     _DAT_copy,B5      ; |353| 
           MVKH    .S2     _DAT_copy,B5      ; |353| 
   [ A0]   STW     .D2T2   B4,*+B10(4)       ; |351| 
   [ A0]   LDW     .D2T2   *B10,B6           ; |353| 
   [!A0]   LDW     .D2T2   *+B10(8),B4       ; |363| 
           ; BRANCH OCCURS                   ; |349| 
;** --------------------------------------------------------------------------*

           CALL    .S2     B5                ; |353| 
||         LDW     .D2T2   *+B10(4),B7       ; |353| 

           LDW     .D2T1   *+B10(12),A4      ; |353| 
           ADDKPC  .S2     RL11,B3,2         ; |353| 

           ADD     .L2     B7,B6,B4          ; |353| 
||         STH     .D2T2   B4,*+B10(16)      ; |352| 

RL11:      ; CALL OCCURS                     ; |353| 
           BNOP    .S1     L12,1             ; |357| 
           MV      .D1     A4,A3             ; |353| 
           STW     .D2T1   A3,*+B10(28)      ; |356| 
           LDW     .D2T1   *+B10(12),A4      ; |357| 

           LDDW    .D2T2   *+SP(8),B11:B10   ; |395| 
||         MV      .S2     B13,B3            ; |395| 

           ; BRANCH OCCURS                   ; |357| 
;** --------------------------------------------------------------------------*
L10:    
           MVKL    .S1     0x1a00001,A4      ; |365| 
           MVKL    .S2     _DAT_copy2d,B5    ; |365| 
           MVKH    .S1     0x1a00001,A4      ; |365| 
           MVKH    .S2     _DAT_copy2d,B5    ; |365| 
           CMPLTU  .L1X    A3,B4,A0          ; |363| 
   [!A0]   BNOP    .S1     L11,1             ; |363| 
   [ A0]   LDHU    .D2T2   *+B10(16),B6      ; |365| 
   [ A0]   LDW     .D2T2   *+B10(12),B4      ; |365| 
   [!A0]   LDHU    .D2T2   *+B10(22),B5      ; |378| 
           NOP             1
           ; BRANCH OCCURS                   ; |363| 
;** --------------------------------------------------------------------------*
           LDW     .D2T2   *B10,B7           ; |365| 
           LDHU    .D2T2   *+B10(26),B8      ; |365| 

           CALL    .S2     B5                ; |365| 
||         LDHU    .D2T1   *+B10(24),A8      ; |365| 

           LDHU    .D2T2   *+B10(22),B6      ; |365| 
||         ADD     .S2     B6,B4,B4          ; |365| 

           ADDKPC  .S2     RL12,B3,2         ; |365| 
           ADD     .D1X    A3,B7,A6          ; |365| 
RL12:      ; CALL OCCURS                     ; |365| 
           MV      .D2X    A4,B11            ; |365| 
           LDHU    .D2T2   *+B10(22),B5      ; |378| 
;** --------------------------------------------------------------------------*
L11:    
           LDHU    .D2T2   *+B10(24),B4      ; |377| 
           LDHU    .D2T2   *+B10(16),B6      ; |378| 
           LDHU    .D2T2   *+B10(26),B8      ; |377| 
           LDW     .D2T2   *+B10(4),B7       ; |377| 
           MVKL    .S1     _DAT_wait,A3      ; |384| 
           MPYU    .M2     B5,B4,B5          ; |378| 

           LDW     .D2T2   *+B10(12),B12     ; |379| 
||         MVKH    .S1     _DAT_wait,A3      ; |384| 

           XOR     .S2     B5,B6,B4          ; |378| 
||         MPYU    .M2     B8,B4,B5          ; |377| 
||         LDW     .D2T1   *+B10(28),A4      ; |384| 

           CALL    .S2X    A3                ; |384| 
||         STH     .D2T2   B4,*+B10(16)      ; |378| 

           LDHU    .D2T1   *+B10(16),A10     ; |379| 
           ADDKPC  .S2     RL13,B3,1         ; |384| 
           ADD     .D2     B5,B7,B4          ; |377| 
           STW     .D2T2   B4,*+B10(4)       ; |377| 
RL13:      ; CALL OCCURS                     ; |384| 

           ADD     .D1X    A10,B12,A4        ; |379| 
||         STW     .D2T2   B11,*+B10(28)     ; |389| 

           LDDW    .D2T2   *+SP(8),B11:B10   ; |395| 
||         MV      .S2     B13,B3            ; |395| 

;** --------------------------------------------------------------------------*
L12:    

           RET     .S2     B3                ; |395| 
||         LDDW    .D2T2   *+SP(16),B13:B12  ; |395| 

           LDW     .D2T1   *++SP(24),A10     ; |395| 
           NOP             4
           ; BRANCH OCCURS                   ; |395| 



	.sect	".text"
	.global	_dstr_rewind

;******************************************************************************
;* FUNCTION NAME: _dstr_rewind                                                *
;*                                                                            *
;*   Regs Modified     : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,B0,B1,B2,  *
;*                           B3,B4,B5,B6,B7,B8,B9,B13,SP,A16,A17,A18,A19,A20, *
;*                           A21,A22,A23,A24,A25,A26,A27,A28,A29,A30,A31,B16, *
;*                           B17,B18,B19,B20,B21,B22,B23,B24,B25,B26,B27,B28, *
;*                           B29,B30,B31                                      *
;*   Regs Used         : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,B0,B1,B2,  *
;*                           B3,B4,B5,B6,B7,B8,B9,B13,SP,A16,A17,A18,A19,A20, *
;*                           A21,A22,A23,A24,A25,A26,A27,A28,A29,A30,A31,B16, *
;*                           B17,B18,B19,B20,B21,B22,B23,B24,B25,B26,B27,B28, *
;*                           B29,B30,B31                                      *
;*   Local Frame Size  : 0 Args + 0 Auto + 16 Save = 16 byte                  *
;******************************************************************************
_dstr_rewind:
;** --------------------------------------------------------------------------*
           CMPEQ   .L2X    A6,1,B0           ; |422| 
   [!B0]   B       .S1     L13               ; |422| 
           STW     .D2T1   A12,*SP--(16)     ; |407| 

           MV      .D1     A4,A10            ; |407| 
||         STDW    .D2T1   A11:A10,*+SP(8)   ; |407| 
||         ZERO    .S1     A3                ; |417| 

           STH     .D1T1   A3,*+A10(16)      ; |417| 

           STW     .D1T2   B4,*A10           ; |416| 
||         MV      .S1     A6,A12            ; |407| 
||         MVKL    .S2     _DAT_wait,B5      ; |425| 

           MVK     .S1     -1,A3             ; |424| 
||         MV      .L2     B3,B13            ; |407| 
||         STW     .D2T2   B13,*+SP(4)       ; |407| 
||         STW     .D1T1   A3,*+A10(4)       ; |418| 
||         MV      .L1X    B6,A11            ; |407| 
||         MVKH    .S2     _DAT_wait,B5      ; |425| 

           ; BRANCH OCCURS                   ; |422| 
;** --------------------------------------------------------------------------*
           CALL    .S2     B5                ; |425| 
           LDW     .D1T1   *+A10(28),A4      ; |425| 
           ADDKPC  .S2     RL14,B3,0         ; |425| 
           STW     .D1T1   A3,*+A10(4)       ; |424| 
           NOP             2
RL14:      ; CALL OCCURS                     ; |425| 
;** --------------------------------------------------------------------------*
L13:    
           MV      .D1     A12,A0            ; |439| 
   [ A0]   BNOP    .S1     L14,1             ; |432| 

           MVKL    .S1     0x5200001,A4      ; |439| 
||         MVKL    .S2     _DAT_copy2d,B5    ; |439| 

           MVKH    .S1     0x5200001,A4      ; |439| 
||         MVKH    .S2     _DAT_copy2d,B5    ; |439| 
|| [!A0]   LDHU    .D1T1   *+A10(24),A3      ; |439| 

   [!A0]   LDW     .D1T1   *+A10(12),A6      ; |439| 

   [!A0]   LDHU    .D1T2   *+A10(26),B8      ; |439| 
|| [ A0]   LDDW    .D2T1   *+SP(8),A11:A10   ; |452| 
|| [ A0]   MV      .S2     B13,B3            ; |452| 

           ; BRANCH OCCURS                   ; |432| 
;** --------------------------------------------------------------------------*

           CALL    .S2     B5                ; |439| 
||         LDHU    .D1T2   *+A10(22),B6      ; |439| 

           LDW     .D1T2   *A10,B4           ; |439| 
           ADDKPC  .S2     RL15,B3,0         ; |439| 
           MPYU    .M1     A3,A11,A3         ; |439| 
           NOP             1
           EXTU    .S1     A3,16,16,A8       ; |439| 
RL15:      ; CALL OCCURS                     ; |439| 
           LDHU    .D1T1   *+A10(24),A5      ; |446| 
           LDHU    .D1T1   *+A10(26),A3      ; |446| 
           LDHU    .D1T1   *+A10(22),A6      ; |447| 
           LDW     .D1T1   *+A10(4),A8       ; |446| 
           STW     .D1T1   A4,*+A10(28)      ; |448| 
           MV      .S2     B13,B3            ; |452| 
           MPYU    .M1     A3,A5,A3          ; |446| 
           MPYU    .M1     A6,A5,A6          ; |447| 

           LDHU    .D1T1   *+A10(16),A5      ; |447| 
||         MPYLHU  .M1     A11,A3,A7         ; |446| 

           MPYU    .M1     A11,A3,A3         ; |446| 
           SHL     .S1     A7,16,A7          ; |446| 

           ADD     .D1     A3,A7,A3          ; |446| 
||         MPYUS   .M1     A11,A6,A6         ; |447| 

           ADD     .S1     A3,A8,A3          ; |446| 

           STW     .D1T1   A3,*+A10(4)       ; |446| 
||         ADD     .S1     A6,A5,A4          ; |447| 

           STH     .D1T1   A4,*+A10(16)      ; |447| 
           LDDW    .D2T1   *+SP(8),A11:A10   ; |452| 
;** --------------------------------------------------------------------------*
L14:    

           RET     .S2     B3                ; |452| 
||         LDW     .D2T2   *+SP(4),B13       ; |452| 

           LDW     .D2T1   *++SP(16),A12     ; |452| 
           NOP             3
           ZERO    .D1     A4                ; |451| 
           ; BRANCH OCCURS                   ; |452| 



	.sect	".text"
	.global	_dstr_close

;******************************************************************************
;* FUNCTION NAME: _dstr_close                                                 *
;*                                                                            *
;*   Regs Modified     : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B3,B4,B5,B6,  *
;*                           B7,B8,B9,A16,A17,A18,A19,A20,A21,A22,A23,A24,A25,*
;*                           A26,A27,A28,A29,A30,A31,B16,B17,B18,B19,B20,B21, *
;*                           B22,B23,B24,B25,B26,B27,B28,B29,B30,B31          *
;*   Regs Used         : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B3,B4,B5,B6,  *
;*                           B7,B8,B9,A16,A17,A18,A19,A20,A21,A22,A23,A24,A25,*
;*                           A26,A27,A28,A29,A30,A31,B16,B17,B18,B19,B20,B21, *
;*                           B22,B23,B24,B25,B26,B27,B28,B29,B30,B31          *
;*   Local Frame Size  : 0 Args + 0 Auto + 4 Save = 4 byte                    *
;******************************************************************************
_dstr_close:
;** --------------------------------------------------------------------------*
           MVKL    .S2     _DAT_wait,B4      ; |466| 
           MVKH    .S2     _DAT_wait,B4      ; |466| 
           CALLRET .S2     B4                ; |466| 
           LDW     .D1T1   *+A4(28),A4       ; |466| 
           NOP             4
RL16:      ; CALL OCCURS                     ; |467| ; bypass _dstr_close upon return


;******************************************************************************
;* UNDEFINED EXTERNAL REFERENCES                                              *
;******************************************************************************
	.global	_DAT_copy
	.global	_DAT_wait
	.global	_DAT_copy2d
	.global	__remi
